﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using System.Collections.ObjectModel;

namespace LoghogInterface
{

    public class myclass
    {
        public string Text { get; set; }
        public int Id { get; set; }
    }

    public class ColumnsIndex : ObservableCollection<myclass>
    {
        public ColumnsIndex() { }

        public ColumnsIndex (ColumnsIndex set)
        {
            foreach (myclass ad in set)
            {
                this.Add(ad);
            }
        }

        public void SetDefault()
        {
            this.Add(new myclass { Text=LoghogInterface.Properties.Resources.ID, Id = 0});
            this.Add(new myclass { Text = LoghogInterface.Properties.Resources.Division, Id = 1 });
            this.Add(new myclass { Text = LoghogInterface.Properties.Resources.TextEvent, Id = 2 });
            this.Add(new myclass { Text = LoghogInterface.Properties.Resources.Date, Id = 3 });
            this.Add(new myclass { Text = LoghogInterface.Properties.Resources.Tags, Id = 4 });
        }

        public void Up(int indx)
        {
            this.Move(indx, indx - 1);     
        }

        public void Down(int indx)
        {
            this.Move(indx, indx + 1);
        }
     }
}
